package com.heykui.restfulcrud.result;

public class CodeMsg {
    private int code;
    private String msg;

    
    // ---------------错误枚举-------------------
    public static final CodeMsg SUSS = new CodeMsg(0, "操作成功");
    public static final CodeMsg FAIL = new CodeMsg(1, "操作失败");
    public static final CodeMsg ERR = new CodeMsg(999, "服务异常");
    
    public static final CodeMsg TOKEN_MISS = new CodeMsg(40001, "未登录");
    public static final CodeMsg TOKEN_EXP = new CodeMsg(40000, "登录超时");


    private CodeMsg(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }
    /**
     * @return the code
     */
    public int getCode() {
        return code;
    }
    /**
     * @return the msg
     */
    public String getMsg() {
        return msg;
    }
}